package com.fcscs.ecms.gwt.server;

import java.util.List;

import com.fcscs.core.gwt.server.FcsRemoteServiceServlet;
import com.fcscs.core.system.ApplicationContextHolder;
import com.fcscs.cservice.domain.MainMenuItem;
import com.fcscs.cservice.domain.model.MainMenuItemView;
import com.fcscs.ecms.gwt.client.ECMSMainMenuService;
import com.fcscs.ecms.service.ECMSMainMenuManager;

public class ECMSMainMenuServiceImpl extends FcsRemoteServiceServlet implements ECMSMainMenuService{

	/**
	 * 
	 */
	private static final long serialVersionUID = -8569964487462392326L;

	private ECMSMainMenuManager mMenuMgr = (ECMSMainMenuManager) 
							ApplicationContextHolder.getBeanFromContext("ecmsMainMenuManager");
	
	
	@Override
	public MainMenuItem getMainMenuItem(long id) {
		return mMenuMgr.getMainMenuItem(id);
	}

	@Override
	public List<MainMenuItem> getMainMenuItemList(long orgId, long propId,boolean isCurrent) {
		return mMenuMgr.getMainMenuItemList(orgId, propId, isCurrent);
	}

	@Override
	public List<MainMenuItem> getMainMenuItemList(long orgId, long propId,long versionId) {
		return mMenuMgr.getMainMenuItemList(orgId, propId, versionId);
	}

	@Override
	public List<MainMenuItem> saveMainMenuItemList(List<MainMenuItem> mmiList) {
		return mMenuMgr.saveMainMenuItemList(mmiList);
	}

	@Override
	public MainMenuItem createMainMenuItem(MainMenuItem mmi) {
		return mMenuMgr.createMainMenuItem(mmi);
	}

	@Override
	public MainMenuItem saveMainMenuItem(MainMenuItem mmi) {
		return mMenuMgr.saveMainMenuItem(mmi);
	}

	@Override
	public boolean deleteMainMenuItem(MainMenuItem mmi) {
		return mMenuMgr.deleteMainMenuItem(mmi);
	}

	@Override
	public boolean permDeleteMainMenuItem(MainMenuItem mmi) {
		return mMenuMgr.permDeleteMainMenuItem(mmi);
	}

	@Override
	public boolean isMainMenuItemTaken(long orgId, long propId,String menuType, Long id, long versionId) {
		return mMenuMgr.isMainMenuItemTaken(orgId, propId, menuType, id, versionId);
	}

	@Override
	public List<MainMenuItemView> getMainMenuItemViewList(long orgId,long propId) {
		return mMenuMgr.getMainMenuItemViewList(orgId, propId);
	}
	
}
